// sku管理模块相关数据类型

export interface ResponseData {
  code: number,
  message: string,
  ok: boolean
}

export interface Attr {
  attrId: number | string,
  valueId: number | string,
  attrName?: string,
  valueName?: string
}
export interface saleAttr {
  saleAttrId: string | number,
  saleAttrValueId: string | number,
  saleAttrValueName?: string,
  saleAttrName?: string
}

export interface skuData {
  [x: string]: any
  category3Id?: string | number,
  spuId?: string | number,
  tmId?: string | number,
  skuName?: string,
  price?: string | number,
  weight?: string | number,
  skuDesc?: string,
  skuAttrValueList?: Attr[],
  skuSaleAttrValueList?: saleAttr[],
  skuDefaultImg?: '',
  isSale?: number,
  id?: number,
}

export interface SkuResponseData extends ResponseData {
  data: {
    records: skuData[]
    "total": number,
    "size": number,
    "current": number,
    "orders": [],
    "optimizeCountSql": boolean,
    "hitCount": boolean,
    "countId": null,
    "maxLimit": null,
    "searchCount": boolean,
    "pages": number
  }
}

export interface skuInfoData extends ResponseData {
  data: skuData
}